package com.lexicalAnalyzer;
import com.parser.Parser;

import java.io.*;
import java.lang.Object;

/**
 * Created with IntelliJ IDEA.
 * User: Lenovo
 * Date: 11.11.2012
 * Time: 16:05
 * To change this template use File | Settings | File Templates.
 */
public class Tester  extends Object
{
    public static void main (String[] args)
    {
//        String filename = args[0];
           try
           {
                FileInputStream fstream = new FileInputStream("parsetest.txt");
                DataInputStream in = new DataInputStream(fstream);

                // Initialze the scanner with the filestream as a parameter
               SymbolTable symbolTable = new SymbolTable();
               Scanner s = new Scanner(in,symbolTable);
               Parser parser = new Parser();
               parser.setScanner(s);
               parser.parse();

               int i = 10;

              // Token token = s.nextToken();
               //SymbolTableEntry symbolTableEntry = new SymbolTableEntry(token.getDataValue().toString());

               /*
               while(token.getTokenCode() != TokenCode.EOF)
               {

                   if(token.getTokenCode() == TokenCode.ID || token.getTokenCode() == TokenCode.NUMBER)
                   {
                       symbolTable.Insert(token.getDataValue().toString());
                   }

                   System.out.println(token.getTokenCode().toString());
                   token = s.nextToken();
               }

               */


           }
           catch (Exception Ex)
           {
               System.out.println("Villa");
           }



    }
}
